from django.contrib import admin
from QuestionAnswerPairs.models import Key_qap,QueAnsPairs

# class TitleAdmin(admin.ModelAdmin):
#     list_display = ('title','weight','clickCount','satisfactionCount','unsatisfationCount')
#     list_filter = ('title','weight','clickCount','satisfactionCount','unsatisfationCount')
#     search_fields = ('title','weight','clickCount','satisfactionCount','unsatisfationCount')
#     ordering = ('weight',)

class KeyAdmin(admin.ModelAdmin):
    list_filter = ('word','weight','clickCount','satisfactionCount','unsatisfationCount')
    list_display =('word','weight','clickCount','satisfactionCount','unsatisfationCount')
    search_fields =('word','weight','clickCount','satisfactionCount','unsatisfationCount')
    ordering =('weight',)

class QueAnsPairsAdmin(admin.ModelAdmin):
    list_display = ('title','content','setDate','updateDate','satisfactionCount','unsatisfactionCount')
    list_filter = ('title','keyWord','content','setDate','updateDate','satisfactionCount','unsatisfactionCount')
    search_fields = ('title','keyWord','content','setDate','updateDate','satisfactionCount','unsatisfactionCount')
    filter_horizontal = ('keyWord',)

# Register your models here.
# admin.site.register(Title_qap,TitleAdmin)
admin.site.register(Key_qap,KeyAdmin)
admin.site.register(QueAnsPairs,QueAnsPairsAdmin)